package com.grao.waterschool.human.manager.service.impl;

import cn.dev33.satoken.stp.StpInterface;
import com.grao.waterschool.human.mapper.TSysTuserMapper;
import com.grao.waterschool.human.mapper.TWschoolUserRoleLinkMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class StpInterfaceImpl implements StpInterface {

    @Autowired
    TWschoolUserRoleLinkMapper userMapper;

    @Autowired
    TSysTuserMapper tSysTuserMapper;

    @Override
    public List<String> getPermissionList(Object o, String s) {
        return null;
    }

    @Override
    public List<String> getRoleList(Object o, String s) {
        return userMapper.getRoleByUserId(tSysTuserMapper.selectTeacherNumById(o.toString()));
    }
}
